-- GENERATED SPELL FOR [Jormungar Behemoth] --


function spell0_32882(pUnit, Event) --@Acid Breath,n/a--
pUnit:FullCastSpellOnTarget(62315,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32882', 19000, 1)
end

function spell1_32882(pUnit, Event) --@Acid Breath,n/a--
pUnit:FullCastSpellOnTarget(62415,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32882', 19000, 1)
end

function spell2_32882(pUnit, Event) --@Sweep,n/a--
pUnit:FullCastSpellOnTarget(62316,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32882', 3285, 1)
end

function spell3_32882(pUnit, Event) --@Sweep,n/a--
pUnit:FullCastSpellOnTarget(62417,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32882', 3342, 1)
end

function Sorts_32882(pUnit, Event)
local choix_sorts_32882 = math.random(0, 3)
if choix_sorts_32882 == 0 then
pUnit:RegisterEvent('spell0_32882', 1, 1)
end
if choix_sorts_32882 == 1 then
pUnit:RegisterEvent('spell1_32882', 1, 1)
end
if choix_sorts_32882 == 2 then
pUnit:RegisterEvent('spell2_32882', 1, 1)
end
if choix_sorts_32882 == 3 then
pUnit:RegisterEvent('spell3_32882', 1, 1)
end
end

function mob32882_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32882', math.random(1500, 3000), 1)
end

function mob32882_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32882_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32882_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32882, 1, 'mob32882_Action')
RegisterUnitEvent(32882, 2, 'mob32882_Leave')
RegisterUnitEvent(32882, 3, 'mob32882_Kill')
RegisterUnitEvent(32882, 4, 'mob32882_Die')
